#include <stdio.h>
#include <string.h>
#include "initProgram.h"
int main(int argc, const char* argv[])
{
	FILE* fap = fopen("stuList.txt","a");
	if(NULL == fap)
	{
		perror("fopen");
		return 1;
	}
	Student stu[1000];
	char str[256] = {};
	for(int i = 0; i < 900; i++)
	{
		//char name[20] = "name;
		char num[10]={};
		sprintf(num,"%d",i);
		strcpy(stu[i].name,"name");
		strcat(stu[i].name,num);
		sprintf(num,"%d",1001+i);
		strcpy(stu[i].password,num);
		stu[i].chnScore = 100;
		stu[i].mathScore = 100;
		stu[i].engScore = 100;
		stu[i].id = 1001+i;
		stu[i].sex = i%2?'m':'w';
		stu[i].flag = 0;
		sprintf(str,"%s %s %.1lf %.1lf %.1lf %d %c %hhd\n",stu[i].name,stu[i].password,stu[i].chnScore,stu[i].mathScore,stu[i].engScore,stu[i].id,stu[i].sex,stu[i].flag);
		fputs(str,fap);
	}
	//fputs("\n",fap);
	fclose(fap);
	fap = NULL;
}
